package sprites;

import controlador.GestorDeDibuix;
import java.awt.Point;

/**
 *
 * @author Carlos Moya Martinez
 */
public class Missil extends PlayableElement {

    public Missil(int x, int y, Point pantalla) {
        super(1, false, x, y, pantalla);
        this.dimX = 16;
        this.dimY = 32;
        this.enemic = true;
    }

    @Override
    public void animar() {
        this.y = this.y + 2;
        if (this.y > this.pantalla.y) {
            this.vides = 0;
        }
    }

    @Override
    public void pintar() {
        GestorDeDibuix.getInstancia().pintar("MISSILE", getX() - (this.dimX / 2), getY() - (this.dimY / 2), dimX, dimY);
    }
}
